package com.elong.spring.proxy;

public class MethodPerformance {
    
    private long begin;
    
    private long end;
    
    private String serviceMethod;

    /** Constructor for MethodPerformance. 
      * <p>Title: </p>
      * <p>Description: </p>
      * @param serviceMethod
      */
    
    public MethodPerformance(String serviceMethod) {
	this.serviceMethod = serviceMethod;
	this.begin = System.currentTimeMillis();
    }
    
    public void printPerformance(){
	end = System.currentTimeMillis();
	long elapse = end - begin;
	
	System.out.println(serviceMethod + "花费" + elapse + "毫秒。");
    }

}
